var patch
var ImageBase
var oep
var counter
var iat_start

mov counter,0
gmi eip,MODULEBASE
mov ImageBase,$RESULT

find eip,#61FF25#
cmp $RESULT,0
je quit
mov oep,$RESULT
bp oep
find eip,#85C97476A1??????008D3401EB65#
cmp $RESULT,0
je quit
mov patch,$RESULT
add patch,C
bp patch
run
bc patch
mov iat_start,esi
find eip,#33C05F5E5B5DC3#
mov eip,$RESULT
run
bc oep
sti
sti
mov oep,eip

cmt eip, "This is the entry point"

sub oep,ImageBase
sub iat_start,ImageBase
mov counter,ImageBase
add counter,3C
mov counter,[counter]
add counter,ImageBase
add counter,28
mov [counter],oep
add counter,58
mov [counter],iat_start
DPE "dump.exe",eip
msg "The file is unpacked! Name ->Dump.exe Remove unnecessary section in Dump"
ret

quit:
msg "Not nakedpack"
ret

